using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HutongGames.PlayMaker;

namespace Examples.Event.Score 
{
    public class GameManager : MonoBehaviour
    {
        private int score;

        private FsmInt scoreVariable;

        void Start()
        {
            scoreVariable = FsmVariables.GlobalVariables.FindFsmInt("score");
            AddScore(100);
        }

        public void AddScore(int score)
        {
            this.score += score;
            if (scoreVariable != null)
            {
                scoreVariable.Value = this.score;
            }
        }
    }
}


